#region License
/* Copyright (c) 2011 Maksymilian Mulawa
	
Redistribution and use in source and binary forms, with or without modification, 
 * are permitted provided that the following conditions are met:

   1. Redistributions of source code must retain the above copyright notice, 
 * this list of conditions and the following disclaimer.
   2. Redistributions in binary form must reproduce the above copyright notice, 
 * this list of conditions and the following disclaimer in the documentation 
 * and/or other materials provided with the distribution.
   3. The name of the author may not be used to endorse or promote products 
 * derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 
 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 
 * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 
 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#endregion

using ReplicationExplorer.DomainModel.Infrastructure;
using ReplicationExplorer.DomainModel.SqlServerAgent;

namespace ReplicationExplorer.DomainModel.Distributor.Entities
{
    public class DistributionDatabase : DomainModelObjectBase
    {
        /// <summary>
        /// Distributor server hosting Distribution database
        /// </summary>
        public DistributorServer Distributor { get; set; }

        /// <summary>
        /// Database Name
        /// </summary>
        public string Name { get; internal set; }

        /// <summary>
        /// ONLINE, OFFLINE, SUSPENDED
        /// </summary>
        public string DatabaseState { get; set; }

        /// <summary>
        /// Database Collation
        /// </summary>
        public string Collation { get; set; }

        /// <summary>
        /// Recover model
        /// </summary>
        public string RecoveryModel { get; set; }

        /// <summary>
        /// Is sync with backup option is ON or OFF
        /// </summary>
        public bool IsSyncWithBackup { get; set; }

        /// <summary>
        /// Minimum retention period, in hours, before transactions are deleted.
        /// </summary>
        public int MinimumRetensionPeriod { get; set; }

        /// <summary>
        /// Maximum retention period, in hours, before transactions are deleted.
        /// </summary>
        public int MaximumRetensionPeriod { get; set; }

        /// <summary>
        /// Number of hours to retain history.
        /// </summary>
        public int HistoryRetensionPeriod { get; set; }

        /// <summary>
        /// Name of the History Cleanup Agent job.
        /// </summary>
        public SqlJob HistoryCleanupAgent { get; set; }

        /// <summary>
        /// Name of the Distribution Cleanup Agent job.
        /// </summary>
        public SqlJob DistributionCleanupAgent { get; set; }

        /// <summary>
        /// Name of the directory used to store the database files.
        /// </summary>
        public string DataFolder { get; set; }

        /// <summary>
        /// Name of the database file.
        /// </summary>
        public string DataFile { get; set; }

        /// <summary>
        /// Initial data file size in megabytes. 
        /// </summary>
        public int DataFileSizeInMB { get; set; }

        /// <summary>
        /// Name of the directory for the database log file.
        /// </summary>
        public string TransactionLogFolder { get; set; }

        /// <summary>
        /// Name of the log file.
        /// </summary>
        public string TransactionLogFile { get; set; }

        /// <summary>
        /// Initial log file size in megabytes.
        /// </summary>
        public int TransactionLogFileSizeInMB { get; set; }
    }
}